package com.cie2.janji.pages;

import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.ioc.annotations.Inject;

import com.cie2.janji.entities.EntityRoleInTime;
import com.cie2.janji.services.BaseEntityService;
import com.cie2.janji.services.EntityRoleInTimeService;

public class EntityDetail {

	private Long id;
	
	@Property
	private EntityRoleInTime roleInTime;
	
	//services
	@Inject
	private BaseEntityService baseEntityService;
	
	@Inject
	private EntityRoleInTimeService entityRoleInTimeService;
	
    void onActivate(Long roleInTimeId) {
    	this.id = roleInTimeId;
    	roleInTime = entityRoleInTimeService.load(id);
     }

     Long onPassivate() {
        return id;
     }     
}
